<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript" src="/static/js/jquery.js"></script>
    <script type="text/javascript">
        $(function () {
            //获取当前请求路径
            var url=location.href;
            //用？分割路径，截取第一个值（localhost:8080/sys/***/**?pageNum=1&pageSize=5）
            url=url.split("?")[0];
            //分页操作
            $("a[name='page']").click(function () {
                var no=$(this).attr("no");
                var data = $("searchButton").serialize();
                location.href=url+"?"+data+"&pageNum="+no;
            });
            //搜索操作
            $("#searchButton").click(function () {
                var data = $("#searchForm").serialize();
                location.href=url+"?"+data;
            })
        });
    </script>
    <%--
    <!--引用分页页面-->
    <jsp:include page="page.jsp"></jsp:include>
    --%>
</head>
<body>
    <div align="center">
        <h2>
        [
           ${pageInfo.pageNum} 当前：页/共：${pageInfo.pages}页
        ]
        共：${pageInfo.total}条记录
        &nbsp;&nbsp;&nbsp;&nbsp;
        <a name="page" no="1">首页</a>
        <a name="page" no="${pageInfo.pageNum-1}">上一页</a>
        <a name="page" no="${pageInfo.pageNum+1}">下一页</a>
        <a name="page" no="${pageInfo.pages}">末页</a>
        </h2>
    </div>
</body>
</html>
